<template>
  <j-modal
    :title="title"
    :width="800"
    :visible="visible"
    :mask-closable="false"
    :ok-button-props="{ props: { disabled: disableSubmit } }"
    :fullscreen="true"
    cancel-text="关闭"
    @close="close"
  >
    <a-spin :spinning="Loading">
      <a-table
        ref="table"
        bordered
        :pagination="ipagination"
        :columns="columns"
        :data-source="dataSource"
        @change="handleTableChange"
      />
    </a-spin>
  </j-modal>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import columns from './columns'

export default {
  name: 'CheckAndEditModel',
  components: {},
  mixins: [JeecgListMixin],
  data() {
    return {
      queryParam: {
        accName: '',
        unitId: '',
        startTime: '',
        endTime: '',
        num: '',
        arrayTime: []
      },
      Loading: false,
      disableSubmit: false,
      columns: columns(this),
      dataSource: [],
      title: '',
      model: {},
      visible: false,
      isCheck: false,
      disableMixinCreated: true,
      url: {
        list: '/sjmx/queryYszkglDetail'
      }
    }
  },
  created() {
  },
  methods: {
    check(record) {
      this.model = Object.assign({}, record)
      this.queryParam = Object.assign({}, this.queryParam, { valueOne: record.proId, valueTwo: record.relatedPartyId })
      this.loadData(1)
      this.visible = true
    },
    close(isSubmit) {
      if (isSubmit) {
      } else {
        this.dataSource = []
        this.visible = false
      }
    }
  }
}
</script>

<style lang="less" scoped>
</style>
